// 导入数据库API
const db = require("../../config/db");

module.exports = {
    get_search_list(search) {
        return new Promise((resolve, reject) => {
            let search_sql = `select * from db_goods where goods_name like '%${search}%'`;
            db.query(search_sql, (err, result) => {
                if (err) {
                    reject(err);
                } else {
                    resolve(result);
                }
            });
        });
    },
};
